package autoz.czt.uml;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.resources.IResource;


public class UmlDiagram {
	private IResource diagram;
	
	private List<UmlClass> classes;
	private List<UmlAssociation> associations;
	
	private boolean dirty; // Whether the diagram has errors or not
	
	public UmlDiagram(IResource diagram){
		this.diagram = diagram;
		this.classes = new ArrayList<UmlClass>();
		this.associations = new ArrayList<UmlAssociation>();
		this.dirty = false;
	}
	
	public void addUmlClass(UmlClass c){
		classes.add(c);
	}
	public void addUmlAssociation(UmlAssociation a){
		associations.add(a);
	}
	
	public List<UmlClass> getClasses() {
		return classes;
	}
	public List<UmlAssociation> getAssociations() {
		return associations;
	}
	
	public IResource getDiagram(){
		return diagram;
	}

	public void setDirty(boolean dirty) {
		this.dirty = dirty;
	}

	public boolean isDirty() {
		return dirty;
	}
}
